/*
 * Copyright (C) 2007 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.plc.provider;

import android.net.Uri;
import android.provider.BaseColumns;

/**
 * Convenience definitions for NotePadProvider
 */
public final class PLC
{
	public static final String AUTHORITY = "com.android.plc.provider";

	public static final String[] PEOFILES_PROJECTION = new String[] { Profiles._ID, Profiles.NAME, Profiles.COMMAND, };

	public static final String[] ROOMS_PROJECTION = new String[] { Rooms._ID, Rooms.NAME, Rooms.CODE };

	public static final String[] DEVICES_PROJECTION = new String[] { Devices._ID, Devices.NAME, Devices.CODE,
			Devices.TYPE,Devices.SUB_TYPE, Devices.ROOM_ID };

	// This class cannot be instantiated

	/**
	 * Profile table
	 */
	public static final class Profiles implements BaseColumns
	{
		// This class cannot be instantiated

		public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/profiles");
		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.plc.profiles";

		public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.plc.profile";
		public static final String DEFAULT_SORT_ORDER = "_id ASC";

		public static final String NAME = "name";
		public static final String COMMAND = "command";
	}

	/**
	 * ProfileDetail table
	 */
	public static final class ProfileDetails implements BaseColumns
	{
		// This class cannot be instantiated

		public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/profile_details");
		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.plc.profile_details";

		public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.plc.profile_detail";
		public static final String DEFAULT_SORT_ORDER = "profile_id ASC";

		public static final String PROFILE_ID = "profile_id";
		public static final String ROOM_UNIT = "room_unit";
		public static final String COMMAND = "command";
		public static final String DATA1 = "data1";
		public static final String DATA2 = "data2";
	}

	/**
	 * Room table
	 */
	public static final class Rooms implements BaseColumns
	{
		// This class cannot be instantiated

		public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/rooms");
		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.plc.rooms";

		public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.plc.room";
		public static final String DEFAULT_SORT_ORDER = "_id ASC";

		public static final String NAME = "name";
		public static final String CODE = "code";
	}

	/**
	 * Device table
	 */
	public static final class Devices implements BaseColumns
	{
		// This class cannot be instantiated

		public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/devices");
		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.plc.devices";

		public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.plc.device";
		public static final String DEFAULT_SORT_ORDER = "devices._id ASC";

		public static final String NAME = "name";
		public static final String TYPE = "type";
		public static final String SUB_TYPE = "sub_type";
		public static final String CODE = "code";
		public static final String ROOM_ID = "room_id";
	}

	/**
	 * Device table
	 */
	public static final class Servers implements BaseColumns
	{
		// This class cannot be instantiated

		public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/servers");
		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.plc.servers";

		public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.plc.server";
		public static final String DEFAULT_SORT_ORDER = "_id DESC";

		public static final String ADDRESS = "address";
		public static final String PORT = "port";
	}
}
